from db import DBClient
from main import data

c = DBClient()
c.update_config_record("tale.database", ['init/tale.db', 'good/tale.db'])
col = c.get_db()[c.right_col_name]

for i in data:
    for n in i['steps']:
        if not col.find_one({"name": n['right']}):
            c.update_right({"name": n['right'], "ret": True})
